package cn.webrx;

public class Reg1 {
    public static void main(String[] args) {
        //System.out.println("ab".matches("a."));
        //System.out.println("a000aaa".matches("a.{6}"));
        //System.out.println("a0001234".matches("a\\d{6}"));
        //System.out.println("a0001234".matches("a\\d{6,}"));

        //要求手机号是空的也正确，符号规则的也正确
        System.out.println("".trim().matches("|1[358]\\d{9}|.*1[358]\\d{9}.*"));

        System.out.println("ab".matches("..."));//false
        System.out.println("ab123".matches("..."));//false
        System.out.println("ab123".matches("^...$"));//false
        System.out.println("ab123".matches(".*"));//true
        System.out.println("ab123".matches(".{0,}"));//true
    }
}
